{
  "properties" : { },
  "id" : "d66837b9dec1445087bb43506a25e025",
  "script" : null,
  "groupId" : "e48013b6b8d644158b1f016b02220176",
  "name" : "查询发现列表",
  "createTime" : 1727071081198,
  "updateTime" : 1726111296754,
  "lock" : "1",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "listDiscover",
  "method" : "GET",
  "parameters" : [ {
    "name" : "current",
    "value" : "1",
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "1",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  }, {
    "name" : "size",
    "value" : "2",
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "30",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  }, {
    "name" : "mtncStatus",
    "value" : "1",
    "description" : "",
    "required" : true,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  }, {
    "name" : "deviceName",
    "value" : "YuQuanGF",
    "description" : "设备名称",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  }, {
    "name" : "ip",
    "value" : "61.2.3.126",
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  }, {
    "name" : "stationTypeStr",
    "value" : "1",
    "description" : "场站类型",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  }, {
    "name" : "deviceTypeStr",
    "value" : "1",
    "description" : "设备类型1路由器2交换机",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  }, {
    "name" : "groupName",
    "value" : "",
    "description" : "组织机构",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  } ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"status\": 200,\n    \"message\": \"success\",\n    \"data\": {\n        \"total\": 0,\n        \"current\": 0,\n        \"size\": 0,\n        \"records\": []\n    }\n}",
  "description" : "",
  "requestBodyDefinition" : {
    "name" : "",
    "value" : { },
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  },
  "responseBodyDefinition" : {
    "name" : "",
    "value" : "",
    "description" : "",
    "required" : false,
    "dataType" : "Object",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ {
      "name" : "status",
      "value" : "200",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "message",
      "value" : "success",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "data",
      "value" : "",
      "description" : "",
      "required" : false,
      "dataType" : "Object",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ {
        "name" : "status",
        "value" : "200",
        "description" : "",
        "required" : false,
        "dataType" : "Integer",
        "type" : "",
        "defaultValue" : "",
        "validateType" : "",
        "error" : "",
        "expression" : "",
        "children" : [ ]
      }, {
        "name" : "message",
        "value" : "success",
        "description" : "",
        "required" : false,
        "dataType" : "String",
        "type" : "",
        "defaultValue" : "",
        "validateType" : "",
        "error" : "",
        "expression" : "",
        "children" : [ ]
      }, {
        "name" : "data",
        "value" : "",
        "description" : "",
        "required" : false,
        "dataType" : "Object",
        "type" : "",
        "defaultValue" : "",
        "validateType" : "",
        "error" : "",
        "expression" : "",
        "children" : [ {
          "name" : "total",
          "value" : "0",
          "description" : "",
          "required" : false,
          "dataType" : "Integer",
          "type" : "",
          "defaultValue" : "",
          "validateType" : "",
          "error" : "",
          "expression" : "",
          "children" : [ ]
        }, {
          "name" : "current",
          "value" : "0",
          "description" : "",
          "required" : false,
          "dataType" : "Integer",
          "type" : "",
          "defaultValue" : "",
          "validateType" : "",
          "error" : "",
          "expression" : "",
          "children" : [ ]
        }, {
          "name" : "size",
          "value" : "0",
          "description" : "",
          "required" : false,
          "dataType" : "Integer",
          "type" : "",
          "defaultValue" : "",
          "validateType" : "",
          "error" : "",
          "expression" : "",
          "children" : [ ]
        }, {
          "name" : "records",
          "value" : "",
          "description" : "",
          "required" : false,
          "dataType" : "String",
          "type" : "",
          "defaultValue" : "",
          "validateType" : "",
          "error" : "",
          "expression" : "",
          "children" : [ ]
        } ]
      } ]
    } ]
  }
}
================================
import org.springblade.common.cache.DictCache;
import response;
var sql = """
    SELECT * FROM ndmp_device where mtnc_Status = 1
  
    <if test="devicename != null and devicename != ''">
        and  device_name LIKE  CONCAT('%',#{devicename} ,'%')
    </if>
    <if test="ip != null and ip != ''">
       and   ip LIKE  CONCAT('%',#{ip} ,'%')
    </if>
    <if test="stationTypeStr != null and stationTypeStr != ''">
       and   Station_Type = #{stationTypeStr}
    </if>

    <if test="deviceTypeStr != null and deviceTypeStr != ''">
         and Device_Type = #{deviceTypeStr}
    </if>

    <if test="groupName != null and groupName != ''">
       and  DCC_ID = #{deviceTypeStr}
    </if>
 

"""

var rs = db.page(sql)
if(rs.records==null){
    return  response.json({
    "status": 200,
    "message": "success",
    "data": {
        "total": 0,
        "current": 0,
        "size": 0,
        "records": []
        }})
}

for (v in rs.records) {
   
    v.put('netRegionStr',v.netRegion=null?"":DictCache.getValue("netRegion",v.netRegion.intValue()));
    //厂站类型
    v.put('stationTypeStr',v.stationType=null?"":DictCache.getValue("stationType",v.stationType.intValue()));
    v.put('stationPropStr',v.stationProp=null?"":DictCache.getValue("stationProp",v.stationProp.intValue()));
    v.put('voltageLevelStr',v.voltageLevel=null?"":DictCache.getValue("voltageLevel",v.voltageLevel.intValue()));
    v.put('deviceTypeStr',v.deviceType=null?"":DictCache.getValue("deviceType",v.deviceType.intValue()));

}


return  rs;